package cn.edu.xmu.oomall.liquidation.microservice.vo;

import cn.edu.xmu.oomall.liquidation.constant.Constants;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.ZonedDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class OnSaleVo {
    private Long id;

    private SimpleShopVo shop;

    private SimpleProductRetVo product;

    private Long price;

    @DateTimeFormat(pattern = Constants.INPUT_DATE_TIME_FORMAT)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "uuuu-MM-dd'T'HH:mm:ss.SSSXXX")
    private ZonedDateTime beginTime;

    @DateTimeFormat(pattern = Constants.INPUT_DATE_TIME_FORMAT)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "uuuu-MM-dd'T'HH:mm:ss.SSSXXX")
    private ZonedDateTime endTime;

    private Long quantity;

    private Byte type;

    private Long activityId;

    private Long shareActId;

    private Integer numKey;

    private Integer maxQuantity;
}
